package cn.ljy.uem.model;

import cn.ljy.authority.model.SysDepartment;
import io.swagger.annotations.ApiModel;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotNull;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

/**
 * 学校部门
 *
 * @author 凡渊
 * @date 2022/07/18 10:42:48
 */
@ApiModel(value="部门")
@Data
@NoArgsConstructor
public class SchoolDepartment implements java.io.Serializable{
    // 在mapper关联部门属性
    private SysDepartment sysDepartment;

    private Integer id;
    private Integer sysDepartmentId;
    private Date createTime;
    private Date updateTime;
    @NotNull(message = "name不能为空")
    private String name;
    @NotNull(message = "sort不能为空")
    private Integer sort;

    //非数据库字段
    private List<SchoolDepartment> children=new ArrayList<>();//该部门拥有的子部门集合（递归）
    private Integer majorNumber;//专业数

}
